package cn.zhp.mapper;

import cn.zhp.entity.SysOffice;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SysOfficeMapper extends Mapper<SysOffice> {



    //根据角色id查询已授权公司
    @Select("select sof.* from  " +
            "sys_role_office sro,sys_office sof " +
            "where " +
            "sro.role_id=#{rid} " +
            "and " +
            "sof.del_flag=0 " +
            "and " +
            "sro.office_id=sof.id")
    List<SysOffice> selectByRid(long rid);


}